﻿<UserControl x:Class="CCSManager.AppStatusRow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:cc="clr-namespace:CCSManager"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="Auto" Height="Auto">
    <UserControl.Resources>
        <cc:FormattingConverter x:Key="formatter"/>
    </UserControl.Resources>
    <Border BorderThickness="0,1,0,0" BorderBrush="Black">
        <StackPanel Orientation="Horizontal">
            <Border Name="AppNameBorder" Width="345" Height="30" Style="{DynamicResource TableCellBackground}" HorizontalAlignment="Left">
                <Button Name="AppNameText" Width="338" Margin="1,0,0,0" Height="Auto" VerticalAlignment="Center" Style="{DynamicResource SimpleButton}" Content="{Binding Path=AppName}" Click="AppNameText_Click" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="FeedbackText" Style="{DynamicResource TableText_AlignR}" Text="{Binding Path=FeedBack}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="RecentRevText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=RecentRev, Converter={StaticResource formatter}, ConverterParameter='\{0:C\}'}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="TotalRevText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=TotalRev, Converter={StaticResource formatter}, ConverterParameter='\{0:C\}'}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="LicensedUsersText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=LicensedUsers}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="RecentInstallsText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=RecentInstalls}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="TotalInstallsText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=TotalInstalls}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="UpcomingTrialExpText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=UpcomingTrialExp}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="UpcomingLicExpText"  Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=UpcomingLicExp}" />
            </Border>
            <Border Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="RecentErrText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=RecentErr}" />
            </Border>
            <Border Name="TotalErrBorder" Height="30" HorizontalAlignment="Right" Style="{DynamicResource TableCellBackground}" VerticalAlignment="Top" Width="80">
                <TextBlock Name="TotalErrText" Style="{DynamicResource TableText_AlignC}" Text="{Binding Path=AppStatus.TotalErr}" />
            </Border>
        </StackPanel>
    </Border>
</UserControl>
